class Solution {
public:
    vector<string> commonChars(vector<string>& words) {
        int n = words.size();
        int cnt = 1;
        int st[110][27] = { 0 };
        for (auto x : words) {
            for (auto y : x) {
                int z = y - 'a' + 1;
                st[cnt][z]++;
            }
            cnt++;
        }
        //cout<<"st[1][1]"<<st[1][1]<<endl;
        vector<string> ans;
        cout << st[1][(int)'l' - 'a' + 1] << endl;
        for (int i = 1; i <= 26; i++) {
            int mi = st[1][i];
            cout << "mi==" << mi << endl;
            for (int j = 2; j <= n; j++) {
                mi = min(mi, st[j][i]);
            }
            cout << "mi==" << mi << endl;
            while (mi--) {
                char x = i + 'a' - 1;
                string y;
                y += x;
                ans.push_back(y);
            }
        }
        return ans;
    }
};